#include "ruleitemwidget.h"
#include "ui_ruleitemwidget.h"

ruleitemwidget::ruleitemwidget(QWidget *parent, Rule *rule) :
    QWidget(parent),
    ui(new Ui::ruleitemwidget)
{
    ui->setupUi(this);
    mRule = rule;
    if (mRule != 0) {
        ui->mRuleLabel->setText(tr(mRule->toLatex().c_str()));
    }
}

ruleitemwidget::~ruleitemwidget()
{
    delete ui;
}

Rule* ruleitemwidget::getRule() {
    return mRule;
}
